package sk.stuba.fiit.arthur.ws.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.ws.client.core.WebServiceTemplate;
import sk.stuba.fiit.pki.ws.schema.beans.DocumentResponse;
import sk.stuba.fiit.pki.ws.schema.beans.GetDocumentRequest;

@Component
public class DocumentServiceClient {
	
	@Autowired
	private WebServiceTemplate documentWsTemplate;

	/**
	 * Gets document list.
	 */
	public DocumentResponse getDocuments(GetDocumentRequest request) {
		DocumentResponse response = (DocumentResponse) documentWsTemplate.marshalSendAndReceive(request);
		return response;
	}
}
